package com.quick.common.config;

import com.quick.common.utils.file.FileUploadUtils;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * 读取项目相关配置
 *
 * @Author: Administrator
 * @Date: 2023/7/17
 */
@Component
@ConfigurationProperties(prefix = "common")
@Data
public class Config {

    /**
     * 上传路径
     */
    private  String fileAddress;

    @PostConstruct
    public void init() {
        FileUploadUtils.setDefaultBaseDir(fileAddress);
    }

}
